﻿@model IEnumerable<Common.Order>

@{
    ViewBag.Title = "MyOrders";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>MyOrders</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            ID
        </th>
        <th>
            UserName
        </th>
        <th>
            Date
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UserName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Date)
        </td>
        <td>
           @Html.ActionLink("View", "MyOrders", new { Controller="Product", id=item.ID }, null)
        </td>
    </tr>
}

</table>
